package com.java65;

public class homework2 {
    public static void main(String[] args) {
        boolean isPrime=true;
        int count=0;
        for (int i = 2; i <=500 ; i++) {
            isPrime=true;
            for (int j = 2; j <i; j++) {
                if(i%j==0){ ;
                    isPrime=false;
                    break;
                }
            }if (isPrime){
                count++;
                System.out.print(i+"\t");
            }
        }
        System.out.println("结束循环" );
        System.out.println("count:"+count);
    }
}
